package com.zyx.xxl.executor.domain;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author Yaxi.Zhang
 * @since 2022/6/13 17:16
 */
@Component
public class XxlJobStaticConfig {
    public static String adminAddresses;
    public static String userName;
    public static String password;
    public static String ifRemember;

    @Value("${xxl.job.admin.addresses}")
    private void setAdminAddresses(String adminAddresses) {
        XxlJobStaticConfig.adminAddresses = adminAddresses;
    }

    @Value("${xxl.job.user.name}")
    public void setUserName(String userName) {
        XxlJobStaticConfig.userName = userName;
    }

    @Value("${xxl.job.pwd}")
    public void setPassword(String password) {
        XxlJobStaticConfig.password = password;
    }

    @Value("${xxl.job.if.remember}")
    public void setIfRemember(String ifRemember) {
        XxlJobStaticConfig.ifRemember = ifRemember;
    }
}
